import request from "@/utils/request";

// 排课列表
export function getList(params) {
  return request({
    url: "/system/class/selectTeacherClass",
    method: "get",
    params,
  });
}

// 排课详情
export function getDetail(id) {
  return request({
    url: `/system/class/${id}`,
    method: "get",
  });
}

// 排课合同
export function getTeacherContrat(params) {
  return request({
    url: "/system/contract/label/selectContractLabelLIstByTeacherId",
    method: "get",
    params,
  });
}

// 新增排课
export function addClass(data) {
  return request({
    url: "/system/class/head/add",
    method: "post",
    data,
  });
}

// 确认排课
export function confirmClass(params) {
  return request({
    url: "/system/class/confirmClass",
    method: "get",
    params,
  });
}

// 教师请假
export function askForLeave(params) {
  return request({
    url: "/system/class/askForLeave",
    method: "get",
    params,
  });
}

// 教师请假
export function delClass(id) {
  return request({
    url: `/system/class/${id}`,
    method: "delete",
  });
}
